import java.util.Comparator;

public class ParsedWordsComparator implements Comparator<ParsedWord> {

    @Override
    public int compare(ParsedWord p1, ParsedWord p2) {
        if (p1 == null || p2 == null)
            throw new NullPointerException();
        return p1.getSignature().compareTo(p2.getSignature());
    }
}
